<template>
 <div class="applicationCenterView row">
  <div class="col-md-12 processNumber">
    <div class="col-md-4 text-center border-right">
      <div class="processCenterTitle">{{firstName}}</div>
      <div class="processCenterData">{{ processdata.totalApp }}</div>
    </div>
    <div class="col-md-4 text-center border-right">
      <div class="processCenterTitle">{{secName}}</div>
      <div class="processCenterData">{{ processdata.totalVisitor }}</div>
    </div>
    <div class="col-md-4 text-center">
      <div class="processCenterTitle">{{thirName}}</div>
      <div class="processCenterData">{{ processdata.totalOnline }}</div>
    </div>
  </div>
  <div>
    <com-bar-charts :barurl="chartsurl"></com-bar-charts>
  </div>
</div>
</template>
<script>
import ComBarCharts from 'components/barCharts.vue';
import BS from '../dataManage';
export default {
  data(){
    return{
      processdata:{},
      firstName:'',
      secName:'',
      thirName:''

    }
  },
  vuex: {
    getters: {
      kind(state) {
        return state.kind
      },
      msg(state){
        return state.msg
      }
    }
  },
  props:{
    'applicationChartsTitle':{
      type:Array
    },
    'chartsurl':{
      type:String
    },
    'titleurl':{
      type:String
    }
  },
  components: {
    ComBarCharts
  },
  ready() {
    var self = this;
    self.firstName = this.applicationChartsTitle[0].name;
    self.secName = this.applicationChartsTitle[1].name;
    self.thirName = this.applicationChartsTitle[2].name;
    BS.getAppCenterView.call(self,self.titleurl,self.msg,self.kind)
  },
  watch:{
    'msg':function(){
      BS.getAppCenterView.call(this,this.titleurl,this.msg,this.kind)
    },
    'kind':function(){
      BS.getAppCenterView.call(this,this.titleurl,this.msg,this.kind)
    }
  }
}
</script>

<style scoped>
div.applicationCenterView {
  width: 100%;
  height: 500px;
  background-color: red;
  float: left;
  margin-top: 16px;
  border-radius: 10px;
  background-color: #3F4752;
  margin-bottom: 16px;
}

div.applicationCenterView .processCenterTitle {
  font-size: 18px;
  color: #fff;
  margin-bottom: 24px;
}
div.applicationCenterView .processCenterData {
    color: #fff;
    font-size: 32px;
}
.processNumber{
  border-bottom: 1px solid #F7F8FC;
}
.border-right{
  border-right: 1px solid #F7F8FC;
}
.processNumber .col-md-4{
  margin-top: 24px;
  margin-bottom: 32px;
}
.row{
  margin-left: 0!important;
  margin-right: 0!important;
}
</style>


